$(document).ready(function() {
    $("#menuData").html('<div class="spinner"><div class="spinner-container container1"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container2"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container3"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div></div>').load('system/admin/portal/loadMenus', function(){
    	try {
    		ace.settings.check('#sidebar', 'collapsed')
    	} catch (e) {
    	}
		$('.submenu ul >li').click(function() {
		         $('.submenu ul >li').removeClass('active');
		         $(this).addClass('active');
		});
    });
 });

function showSubmenu(menuId,path,url,pathName,icon,subName){
	$(".breadcrumb").empty();
	$(".breadcrumb").append('<li><i class="menu-icon fa '+icon+'"></i>'+ pathName +'</li><li>'+subName+'</li>')
	$(".page-content").empty();
	$(".page-content").load(path+url,{'menuId':menuId});
}